home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / Source / Library & Plugs / Plug-Ins Dev 68K / Silence.c < prev   
Encoding:
C/C++ Source or Header  |  1994-02-05  |  950 b   |  52 lines  |  [TEXT/KAHL]

  1. /*    Player PRO 4.11 PlugIns
  2.  
  3.     Antoine ROSSET
  4.     16 Tranchees
  5.     1206 GENEVA
  6.     SWITZERLAND
  7.     
  8.     FAX: 022 789 35 03
  9.     Compuserve: 100277,164
  10. */
  11.  
  12. /*****************************************************/
  13.  
  14. /*     This is an exemple of Player PRO's PlugIns.
  15.     Compiling: 'PLug', ID = 1000
  16.     STR# ID 1000: Menu Name
  17.     
  18.     If you want to reallocate InstrumentPtr:
  19.     
  20.     DisposPtr( InstrumentPtr);            // VERY IMPORTANT
  21.     
  22.     InstrumentPtr = NewPtr( newsize);    // Use NewPtr ONLY !
  23.     
  24.     And UPDATE the FileInstrData->insSize !!!!!!!!!!!!
  25.     
  26. */
  27.  
  28. /********************************************************/
  29.  
  30.  
  31. // Exemple: SILENCE PlugIns. Set Selection to 0.
  32.  
  33. #include "MAD.h"
  34.  
  35. OSErr main(     Ptr                        *InstrumentPtr,
  36.                 struct FileInstrData    *theData,
  37.                 long                    SelectionStart,
  38.                 long                    SelectionEnd)
  39. {
  40. long    i;
  41. Ptr        SamplePtr = *InstrumentPtr;
  42.  
  43.     SamplePtr += SelectionStart;
  44.     
  45.     for( i = 0; i < SelectionEnd - SelectionStart; i++)
  46.     {
  47.         *SamplePtr = 0;
  48.         SamplePtr++;
  49.     }
  50.     
  51.     return noErr;
  52. }